package com.ruoyi.common.core.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Column;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

/**
 * @author Dale Mao    ---多多 Email:453918229@qq.com
 * @description BaseJpa jpa基础类
 * @date 2021-01-26 13:27
 */
public class BaseJpa implements Serializable {


    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "createTime",insertable = false,updatable = false)
    private Timestamp createTime;

    @Column(name = "status")
    private Integer status;

    /** 更新时间 */
    @Column(name = "updateTime",insertable = false,updatable = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp updateTime;

    @Override
    public String toString() {
        return "BaseJpa{" +
                "createTime=" + createTime +
                ", status=" + status +
                ", updateTime=" + updateTime +
                '}';
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
}
